package com.per.mybootall.test;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: yyy
 * Date: 2022/2/15
 * Time: 14:32
 * Description:
 */
public class test14 {
  public static void main(String[] args) {

      SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

      Calendar calendar1 = Calendar.getInstance();
      calendar1.setTime(new Date());
      calendar1.add(12, 1);


      Calendar calendar = Calendar.getInstance();
      calendar.setTime( calendar1.getTime()  );

      String cron = "0 " + calendar.get(Calendar.MINUTE) + " "
              + calendar.get(Calendar.HOUR_OF_DAY) + " "
              + calendar.get(Calendar.DAY_OF_MONTH) + " "
              + (calendar.get(Calendar.MONTH) + 1) + " ? "
              + calendar.get(Calendar.YEAR);
      System.out.println("time:      "+cron);
  }
}
